<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Math</title>
</head>
<body>

</body>
<script>
    //1. ceil(x) 向上取整
    document.write(Math.ceil(3.21) + "<br>");
    //2. floor(x) 向下取整
    document.write(Math.floor(3.14) + "<br>");
    //3. round(x) 把数四舍五入为最接近的整数
    document.write(Math.round(3.14) + "<br>");
    //4. random() 随机数,返回的是0.0-1.0之间范围(含头不含尾)
    document.write(Math.random() + "<br>");
    //5. pow(x,y) 幂运算 x的y次方
    document.write(Math.pow(2,4));
</script>
</html>